{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "5af8b644",
   "metadata": {},
   "source": [
    "# Rotation of Axis Labels\n",
    "\n",
    "The `angle` parameter in `elementText()` function allows to rotate the text. \n",
    "\n",
    "Note: currently this only works for axis labels, i.e. for `axisText, axisTextX, axisTextY` parameters in `theme()`."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "caa39690",
   "metadata": {},
   "source": [
    "1. [Default Axis Labels Layout](#1.-Default-Axis-Labels-Layout)  \n",
    "\n",
    "2. [Layout Labels for Discrete Axis](#2.-Layout-Labels-for-Discrete-Axis)  \n",
    " \n",
    "3. [Layout Labels for Continuous Axis](#3.-Layout-Labels-for-Continuous-Axis)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "japanese-handling",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"w7Jj7n\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"library\">\n",
       "       if(!window.letsPlotCallQueue) {\n",
       "           window.letsPlotCallQueue = [];\n",
       "       }; \n",
       "       window.letsPlotCall = function(f) {\n",
       "           window.letsPlotCallQueue.push(f);\n",
       "       };\n",
       "       (function() {\n",
       "           var script = document.createElement(\"script\");\n",
       "           script.type = \"text/javascript\";\n",
       "           script.src = \"https://cdn.jsdelivr.net/gh/JetBrains/lets-plot@v3.2.0/js-package/distr/lets-plot.min.js\";\n",
       "           script.onload = function() {\n",
       "               window.letsPlotCall = function(f) {f();};\n",
       "               window.letsPlotCallQueue.forEach(function(f) {f();});\n",
       "               window.letsPlotCallQueue = [];\n",
       "               \n",
       "               \n",
       "           };\n",
       "           script.onerror = function(event) {\n",
       "               window.letsPlotCall = function(f) {};\n",
       "               window.letsPlotCallQueue = [];\n",
       "               var div = document.createElement(\"div\");\n",
       "               div.style.color = 'darkred';\n",
       "               div.textContent = 'Error loading Lets-Plot JS';\n",
       "               document.getElementById(\"w7Jj7n\").appendChild(div);\n",
       "           };\n",
       "           var e = document.getElementById(\"w7Jj7n\");\n",
       "           e.appendChild(script);\n",
       "       })();\n",
       "   </script>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "            <div id=\"kotlin_out_0\"></div>\n",
       "            <script type=\"text/javascript\">\n",
       "                            if(!window.kotlinQueues) {\n",
       "                window.kotlinQueues = {};\n",
       "            }\n",
       "            if(!window.kotlinQueues[\"DataFrame\"]) {\n",
       "                var resQueue = [];\n",
       "                window.kotlinQueues[\"DataFrame\"] = resQueue;\n",
       "                window[\"call_DataFrame\"] = function(f) {\n",
       "                    resQueue.push(f);\n",
       "                }\n",
       "            }\n",
       "            (function (){\n",
       "                var modifiers = [(function(script) {\n",
       "    script.src = \"https://cdn.jsdelivr.net/gh/Kotlin/dataframe@3db46ccccaa1291c0627307d64133317f545e6ae/core/src/main/resources/init.js\"\n",
       "    script.type = \"text/javascript\";\n",
       "})];\n",
       "                var e = document.getElementById(\"kotlin_out_0\");\n",
       "                modifiers.forEach(function (gen) {\n",
       "                    var script = document.createElement(\"script\");\n",
       "                    gen(script)\n",
       "                    script.addEventListener(\"load\", function() {\n",
       "                        window[\"call_DataFrame\"] = function(f) {f();};\n",
       "                        window.kotlinQueues[\"DataFrame\"].forEach(function(f) {f();});\n",
       "                        window.kotlinQueues[\"DataFrame\"] = [];\n",
       "                    }, false);\n",
       "                    script.addEventListener(\"error\", function() {\n",
       "                        window[\"call_DataFrame\"] = function(f) {};\n",
       "                        window.kotlinQueues[\"DataFrame\"] = [];\n",
       "                        var div = document.createElement(\"div\");\n",
       "                        div.style.color = 'darkred';\n",
       "                        div.textContent = 'Error loading resource DataFrame';\n",
       "                        document.getElementById(\"kotlin_out_0\").appendChild(div);\n",
       "                    }, false);\n",
       "                    \n",
       "                    e.appendChild(script);\n",
       "                });\n",
       "            })();\n",
       "            </script>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "                <style>\n",
       "                :root {\n",
       "    --background: #fff;\n",
       "    --background-odd: #f5f5f5;\n",
       "    --background-hover: #d9edfd;\n",
       "    --header-text-color: #474747;\n",
       "    --text-color: #848484;\n",
       "    --text-color-dark: #000;\n",
       "    --text-color-medium: #737373;\n",
       "    --text-color-pale: #b3b3b3;\n",
       "    --inner-border-color: #aaa;\n",
       "    --bold-border-color: #000;\n",
       "    --link-color: #296eaa;\n",
       "    --link-color-pale: #296eaa;\n",
       "    --link-hover: #1a466c;\n",
       "}\n",
       "\n",
       ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n",
       "    --background: #303030;\n",
       "    --background-odd: #3c3c3c;\n",
       "    --background-hover: #464646;\n",
       "    --header-text-color: #dddddd;\n",
       "    --text-color: #b3b3b3;\n",
       "    --text-color-dark: #dddddd;\n",
       "    --text-color-medium: #b2b2b2;\n",
       "    --text-color-pale: #737373;\n",
       "    --inner-border-color: #707070;\n",
       "    --bold-border-color: #777777;\n",
       "    --link-color: #008dc0;\n",
       "    --link-color-pale: #97e1fb;\n",
       "    --link-hover: #00688e;\n",
       "}\n",
       "\n",
       "p.dataframe_description {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "table.dataframe {\n",
       "    font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n",
       "    font-size: 12px;\n",
       "    background-color: var(--background);\n",
       "    color: var(--text-color-dark);\n",
       "    border: none;\n",
       "    border-collapse: collapse;\n",
       "}\n",
       "\n",
       "table.dataframe th, td {\n",
       "    padding: 6px;\n",
       "    border: 1px solid transparent;\n",
       "    text-align: left;\n",
       "}\n",
       "\n",
       "table.dataframe th {\n",
       "    background-color: var(--background);\n",
       "    color: var(--header-text-color);\n",
       "}\n",
       "\n",
       "table.dataframe td {\n",
       "    vertical-align: top;\n",
       "}\n",
       "\n",
       "table.dataframe th.bottomBorder {\n",
       "    border-bottom-color: var(--bold-border-color);\n",
       "}\n",
       "\n",
       "table.dataframe tbody > tr:nth-child(odd) {\n",
       "    background: var(--background-odd);\n",
       "}\n",
       "\n",
       "table.dataframe tbody > tr:nth-child(even) {\n",
       "    background: var(--background);\n",
       "}\n",
       "\n",
       "table.dataframe tbody > tr:hover {\n",
       "    background: var(--background-hover);\n",
       "}\n",
       "\n",
       "table.dataframe a {\n",
       "    cursor: pointer;\n",
       "    color: var(--link-color);\n",
       "    text-decoration: none;\n",
       "}\n",
       "\n",
       "table.dataframe tr:hover > td a {\n",
       "    color: var(--link-color-pale);\n",
       "}\n",
       "\n",
       "table.dataframe a:hover {\n",
       "    color: var(--link-hover);\n",
       "    text-decoration: underline;\n",
       "}\n",
       "\n",
       "table.dataframe img {\n",
       "    max-width: fit-content;\n",
       "}\n",
       "\n",
       "table.dataframe th.complex {\n",
       "    background-color: var(--background);\n",
       "    border: 1px solid var(--background);\n",
       "}\n",
       "\n",
       "table.dataframe .leftBorder {\n",
       "    border-left-color: var(--inner-border-color);\n",
       "}\n",
       "\n",
       "table.dataframe .rightBorder {\n",
       "    border-right-color: var(--inner-border-color);\n",
       "}\n",
       "\n",
       "table.dataframe .rightAlign {\n",
       "    text-align: right;\n",
       "}\n",
       "\n",
       "table.dataframe .expanderSvg {\n",
       "    width: 8px;\n",
       "    height: 8px;\n",
       "    margin-right: 3px;\n",
       "}\n",
       "\n",
       "table.dataframe .expander {\n",
       "    display: flex;\n",
       "    align-items: center;\n",
       "}\n",
       "\n",
       "/* formatting */\n",
       "\n",
       "table.dataframe .null {\n",
       "    color: var(--text-color-pale);\n",
       "}\n",
       "\n",
       "table.dataframe .structural {\n",
       "    color: var(--text-color-medium);\n",
       "    font-weight: bold;\n",
       "}\n",
       "\n",
       "table.dataframe .dataFrameCaption {\n",
       "    font-weight: bold;\n",
       "}\n",
       "\n",
       "table.dataframe .numbers {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "table.dataframe td:hover .formatted .structural, .null {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "table.dataframe tr:hover .formatted .structural, .null {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "\n",
       "                </style>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%useLatestDescriptors\n",
    "%use lets-plot\n",
    "%use dataframe"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "guilty-major",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Lets-Plot Kotlin API v.4.4.1. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.3.2.0."
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LetsPlot.getInfo()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "28a46b3c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/kotlindataframe+json": "{\"nrow\":5,\"ncol\":29,\"columns\":[\"untitled\",\"PID\",\"county\",\"state\",\"area\",\"poptotal\",\"popdensity\",\"popwhite\",\"popblack\",\"popamerindian\",\"popasian\",\"popother\",\"percwhite\",\"percblack\",\"percamerindan\",\"percasian\",\"percother\",\"popadults\",\"perchsd\",\"percollege\",\"percprof\",\"poppovertyknown\",\"percpovertyknown\",\"percbelowpoverty\",\"percchildbelowpovert\",\"percadultpoverty\",\"percelderlypoverty\",\"inmetro\",\"category\"],\"kotlin_dataframe\":[{\"untitled\":1,\"PID\":561,\"county\":\"ADAMS\",\"state\":\"IL\",\"area\":0.052,\"poptotal\":66090,\"popdensity\":1270.96154,\"popwhite\":63917,\"popblack\":1702,\"popamerindian\":98,\"popasian\":249,\"popother\":124,\"percwhite\":96.7120593,\"percblack\":2.57527614,\"percamerindan\":0.14828264,\"percasian\":0.37675897,\"percother\":0.18762294,\"popadults\":43298,\"perchsd\":75.1073953,\"percollege\":19.6313918,\"percprof\":4.35585939,\"poppovertyknown\":63628,\"percpovertyknown\":96.2747768,\"percbelowpoverty\":13.1514428,\"percchildbelowpovert\":18.0117169,\"percadultpoverty\":11.0097759,\"percelderlypoverty\":12.4438118,\"inmetro\":0,\"category\":\"AAR\"},{\"untitled\":2,\"PID\":562,\"county\":\"ALEXANDER\",\"state\":\"IL\",\"area\":0.014,\"poptotal\":10626,\"popdensity\":759.0,\"popwhite\":7054,\"popblack\":3496,\"popamerindian\":19,\"popasian\":48,\"popother\":9,\"percwhite\":66.3843403,\"percblack\":32.9004329,\"percamerindan\":0.1788067,\"percasian\":0.45172219,\"percother\":0.08469791,\"popadults\":6724,\"perchsd\":59.7263534,\"percollege\":11.2433076,\"percprof\":2.87031529,\"poppovertyknown\":10529,\"percpovertyknown\":99.0871447,\"percbelowpoverty\":32.2442777,\"percchildbelowpovert\":45.8265139,\"percadultpoverty\":27.3856467,\"percelderlypoverty\":25.2289759,\"inmetro\":0,\"category\":\"LHR\"},{\"untitled\":3,\"PID\":563,\"county\":\"BOND\",\"state\":\"IL\",\"area\":0.022,\"poptotal\":14991,\"popdensity\":681.409091,\"popwhite\":14477,\"popblack\":429,\"popamerindian\":35,\"popasian\":16,\"popother\":34,\"percwhite\":96.5712761,\"percblack\":2.86171703,\"percamerindan\":0.23347342,\"percasian\":0.10673071,\"percother\":0.22680275,\"popadults\":9669,\"perchsd\":69.3349881,\"percollege\":17.0338194,\"percprof\":4.48857172,\"poppovertyknown\":14235,\"percpovertyknown\":94.9569742,\"percbelowpoverty\":12.0688444,\"percchildbelowpovert\":14.036061,\"percadultpoverty\":10.85209,\"percelderlypoverty\":12.69741,\"inmetro\":0,\"category\":\"AAR\"},{\"untitled\":4,\"PID\":564,\"county\":\"BOONE\",\"state\":\"IL\",\"area\":0.017,\"poptotal\":30806,\"popdensity\":1812.11765,\"popwhite\":29344,\"popblack\":127,\"popamerindian\":46,\"popasian\":150,\"popother\":1139,\"percwhite\":95.2541713,\"percblack\":0.41225735,\"percamerindan\":0.14932156,\"percasian\":0.48691813,\"percother\":3.69733169,\"popadults\":19272,\"perchsd\":75.4721876,\"percollege\":17.2789539,\"percprof\":4.19779992,\"poppovertyknown\":30337,\"percpovertyknown\":98.4775693,\"percbelowpoverty\":7.20901869,\"percchildbelowpovert\":11.1795358,\"percadultpoverty\":5.53601292,\"percelderlypoverty\":6.21704745,\"inmetro\":1,\"category\":\"ALU\"},{\"untitled\":5,\"PID\":565,\"county\":\"BROWN\",\"state\":\"IL\",\"area\":0.018,\"poptotal\":5836,\"popdensity\":324.222222,\"popwhite\":5264,\"popblack\":547,\"popamerindian\":14,\"popasian\":5,\"popother\":6,\"percwhite\":90.1987663,\"percblack\":9.37285812,\"percamerindan\":0.23989034,\"percasian\":0.08567512,\"percother\":0.10281014,\"popadults\":3979,\"perchsd\":68.861523,\"percollege\":14.475999,\"percprof\":3.36768032,\"poppovertyknown\":4815,\"percpovertyknown\":82.5051405,\"percbelowpoverty\":13.5202492,\"percchildbelowpovert\":13.0228887,\"percadultpoverty\":11.1432109,\"percelderlypoverty\":19.2,\"inmetro\":0,\"category\":\"AAR\"}]}",
      "text/html": [
       "        <html>\n",
       "        <head>\n",
       "            <style type=\"text/css\">\n",
       "                :root {\n",
       "    --background: #fff;\n",
       "    --background-odd: #f5f5f5;\n",
       "    --background-hover: #d9edfd;\n",
       "    --header-text-color: #474747;\n",
       "    --text-color: #848484;\n",
       "    --text-color-dark: #000;\n",
       "    --text-color-medium: #737373;\n",
       "    --text-color-pale: #b3b3b3;\n",
       "    --inner-border-color: #aaa;\n",
       "    --bold-border-color: #000;\n",
       "    --link-color: #296eaa;\n",
       "    --link-color-pale: #296eaa;\n",
       "    --link-hover: #1a466c;\n",
       "}\n",
       "\n",
       ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n",
       "    --background: #303030;\n",
       "    --background-odd: #3c3c3c;\n",
       "    --background-hover: #464646;\n",
       "    --header-text-color: #dddddd;\n",
       "    --text-color: #b3b3b3;\n",
       "    --text-color-dark: #dddddd;\n",
       "    --text-color-medium: #b2b2b2;\n",
       "    --text-color-pale: #737373;\n",
       "    --inner-border-color: #707070;\n",
       "    --bold-border-color: #777777;\n",
       "    --link-color: #008dc0;\n",
       "    --link-color-pale: #97e1fb;\n",
       "    --link-hover: #00688e;\n",
       "}\n",
       "\n",
       "p.dataframe_description {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "table.dataframe {\n",
       "    font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n",
       "    font-size: 12px;\n",
       "    background-color: var(--background);\n",
       "    color: var(--text-color-dark);\n",
       "    border: none;\n",
       "    border-collapse: collapse;\n",
       "}\n",
       "\n",
       "table.dataframe th, td {\n",
       "    padding: 6px;\n",
       "    border: 1px solid transparent;\n",
       "    text-align: left;\n",
       "}\n",
       "\n",
       "table.dataframe th {\n",
       "    background-color: var(--background);\n",
       "    color: var(--header-text-color);\n",
       "}\n",
       "\n",
       "table.dataframe td {\n",
       "    vertical-align: top;\n",
       "}\n",
       "\n",
       "table.dataframe th.bottomBorder {\n",
       "    border-bottom-color: var(--bold-border-color);\n",
       "}\n",
       "\n",
       "table.dataframe tbody > tr:nth-child(odd) {\n",
       "    background: var(--background-odd);\n",
       "}\n",
       "\n",
       "table.dataframe tbody > tr:nth-child(even) {\n",
       "    background: var(--background);\n",
       "}\n",
       "\n",
       "table.dataframe tbody > tr:hover {\n",
       "    background: var(--background-hover);\n",
       "}\n",
       "\n",
       "table.dataframe a {\n",
       "    cursor: pointer;\n",
       "    color: var(--link-color);\n",
       "    text-decoration: none;\n",
       "}\n",
       "\n",
       "table.dataframe tr:hover > td a {\n",
       "    color: var(--link-color-pale);\n",
       "}\n",
       "\n",
       "table.dataframe a:hover {\n",
       "    color: var(--link-hover);\n",
       "    text-decoration: underline;\n",
       "}\n",
       "\n",
       "table.dataframe img {\n",
       "    max-width: fit-content;\n",
       "}\n",
       "\n",
       "table.dataframe th.complex {\n",
       "    background-color: var(--background);\n",
       "    border: 1px solid var(--background);\n",
       "}\n",
       "\n",
       "table.dataframe .leftBorder {\n",
       "    border-left-color: var(--inner-border-color);\n",
       "}\n",
       "\n",
       "table.dataframe .rightBorder {\n",
       "    border-right-color: var(--inner-border-color);\n",
       "}\n",
       "\n",
       "table.dataframe .rightAlign {\n",
       "    text-align: right;\n",
       "}\n",
       "\n",
       "table.dataframe .expanderSvg {\n",
       "    width: 8px;\n",
       "    height: 8px;\n",
       "    margin-right: 3px;\n",
       "}\n",
       "\n",
       "table.dataframe .expander {\n",
       "    display: flex;\n",
       "    align-items: center;\n",
       "}\n",
       "\n",
       "/* formatting */\n",
       "\n",
       "table.dataframe .null {\n",
       "    color: var(--text-color-pale);\n",
       "}\n",
       "\n",
       "table.dataframe .structural {\n",
       "    color: var(--text-color-medium);\n",
       "    font-weight: bold;\n",
       "}\n",
       "\n",
       "table.dataframe .dataFrameCaption {\n",
       "    font-weight: bold;\n",
       "}\n",
       "\n",
       "table.dataframe .numbers {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "table.dataframe td:hover .formatted .structural, .null {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "table.dataframe tr:hover .formatted .structural, .null {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "            </style>\n",
       "        </head>\n",
       "        <body>\n",
       "            \n",
       "<table class=\"dataframe\" id=\"df_1493172224\"></table>\n",
       "\n",
       "<p class=\"dataframe_description\">DataFrame: rowsCount = 5, columnsCount = 29</p>\n",
       "        </body>\n",
       "        <script>\n",
       "            \n",
       "/*<!--*/\n",
       "call_DataFrame(function() { DataFrame.addTable({ cols: [{ name: \"<span title=\\\"untitled: Int\\\">untitled</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">1</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">2</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">3</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">4</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">5</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"PID: Int\\\">PID</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">561</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">562</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">563</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">564</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">565</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"county: String\\\">county</span>\", children: [], rightAlign: false, values: [\"ADAMS\",\"ALEXANDER\",\"BOND\",\"BOONE\",\"BROWN\"] }, \n",
       "{ name: \"<span title=\\\"state: String\\\">state</span>\", children: [], rightAlign: false, values: [\"IL\",\"IL\",\"IL\",\"IL\",\"IL\"] }, \n",
       "{ name: \"<span title=\\\"area: Double\\\">area</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,052</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,014</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,022</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,017</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,018</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"poptotal: Int\\\">poptotal</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">66090</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">10626</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">14991</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">30806</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">5836</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"popdensity: Double\\\">popdensity</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">1270,961540</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">759,000000</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">681,409091</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">1812,117650</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">324,222222</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"popwhite: Int\\\">popwhite</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">63917</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">7054</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">14477</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">29344</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">5264</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"popblack: Int\\\">popblack</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">1702</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">3496</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">429</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">127</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">547</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"popamerindian: Int\\\">popamerindian</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">98</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">19</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">35</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">46</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">14</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"popasian: Int\\\">popasian</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">249</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">48</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">16</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">150</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">5</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"popother: Int\\\">popother</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">124</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">9</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">34</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">1139</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">6</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"percwhite: Double\\\">percwhite</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">96,712059</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">66,384340</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">96,571276</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">95,254171</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">90,198766</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"percblack: Double\\\">percblack</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">2,575276</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">32,900433</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">2,861717</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,412257</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">9,372858</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"percamerindan: Double\\\">percamerindan</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,148283</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,178807</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,233473</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,149322</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,239890</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"percasian: Double\\\">percasian</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,376759</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,451722</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,106731</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,486918</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,085675</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"percother: Double\\\">percother</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,187623</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,084698</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,226803</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">3,697332</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0,102810</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"popadults: Int\\\">popadults</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">43298</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">6724</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">9669</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">19272</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">3979</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"perchsd: Double\\\">perchsd</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">75,107395</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">59,726353</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">69,334988</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">75,472188</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">68,861523</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"percollege: Double\\\">percollege</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">19,631392</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">11,243308</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">17,033819</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">17,278954</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">14,475999</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"percprof: Double\\\">percprof</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">4,355859</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">2,870315</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">4,488572</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">4,197800</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">3,367680</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"poppovertyknown: Int\\\">poppovertyknown</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">63628</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">10529</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">14235</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">30337</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">4815</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"percpovertyknown: Double\\\">percpovertyknown</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">96,274777</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">99,087145</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">94,956974</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">98,477569</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">82,505141</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"percbelowpoverty: Double\\\">percbelowpoverty</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">13,151443</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">32,244278</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">12,068844</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">7,209019</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">13,520249</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"percchildbelowpovert: Double\\\">percchildbelowpovert</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">18,011717</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">45,826514</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">14,036061</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">11,179536</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">13,022889</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"percadultpoverty: Double\\\">percadultpoverty</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">11,009776</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">27,385647</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">10,852090</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">5,536013</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">11,143211</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"percelderlypoverty: Double\\\">percelderlypoverty</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">12,443812</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">25,228976</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">12,697410</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">6,217047</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">19,200000</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"inmetro: Int\\\">inmetro</span>\", children: [], rightAlign: true, values: [\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">1</span></span>\",\"<span class=\\\"formatted\\\" title=\\\"\\\"><span class=\\\"numbers\\\">0</span></span>\"] }, \n",
       "{ name: \"<span title=\\\"category: String\\\">category</span>\", children: [], rightAlign: false, values: [\"AAR\",\"LHR\",\"AAR\",\"ALU\",\"AAR\"] }, \n",
       "], id: 1493172224, rootId: 1493172224, totalRows: 5 } ) });\n",
       "/*-->*/\n",
       "\n",
       "call_DataFrame(function() { DataFrame.renderTable(1493172224) });\n",
       "\n",
       "\n",
       "        </script>\n",
       "        </html>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "val df = DataFrame.readCSV(\"https://raw.githubusercontent.com/JetBrains/lets-plot-docs/master/data/midwest.csv\")\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "0c126f22",
   "metadata": {},
   "outputs": [],
   "source": [
    "val fullStateNames = mapOf(\n",
    "    \"IL\" to \"Illinois\",\n",
    "    \"IN\" to \"Indiana\",\n",
    "    \"MI\" to \"Michigan\",\n",
    "    \"OH\" to \"Ohio\",\n",
    "    \"WI\" to \"Wisconsin\"\n",
    ")\n",
    "\n",
    "val data = df.toMap().mapValues { (key, values) ->\n",
    "    if (key == \"state\") {\n",
    "        values.map { value -> fullStateNames[value] ?: value }\n",
    "    } else {\n",
    "        values\n",
    "    }\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "48f47b85",
   "metadata": {},
   "outputs": [],
   "source": [
    "val highlightAxisLabels = theme(\n",
    "    text=elementText(color=\"gray\", size=13), \n",
    "    axisText=elementText(color=\"blue\")\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d5871238",
   "metadata": {},
   "source": [
    "#### 1. Default Axis Labels Layout"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "31ba332d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"C7oBBO\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "       (function() {\n",
       "           var plotSpec={\n",
       "\"mapping\":{\n",
       "},\n",
       "\"data\":{\n",
       "\"state\":[\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\"],\n",
       "\"poptotal\":[66090.0,10626.0,14991.0,30806.0,5836.0,35688.0,5322.0,16805.0,13437.0,173025.0,34418.0,15921.0,14460.0,33944.0,51644.0,5105067.0,19464.0,10670.0,77932.0,16516.0,19464.0,781666.0,19595.0,7440.0,31704.0,20893.0,14275.0,40319.0,38080.0,6909.0,15317.0,32337.0,8499.0,21373.0,5189.0,8096.0,51159.0,30787.0,61067.0,10609.0,37020.0,20539.0,21821.0,11347.0,317471.0,96255.0,39413.0,56393.0,516418.0,106913.0,15972.0,34392.0,39301.0,30798.0,35244.0,183241.0,129180.0,117206.0,47679.0,249238.0,41561.0,12846.0,16269.0,14752.0,11164.0,17290.0,22422.0,30728.0,36397.0,13930.0,45957.0,182827.0,21412.0,15548.0,17577.0,4373.0,7523.0,5730.0,34583.0,16545.0,148723.0,262852.0,26551.0,178386.0,7498.0,5644.0,22261.0,6534.0,48052.0,123692.0,17619.0,88257.0,13111.0,19181.0,14965.0,17241.0,16522.0,60186.0,357313.0,57733.0,252913.0,32653.0,31095.0,300836.0,63657.0,9441.0,14067.0,38147.0,14080.0,18809.0,38413.0,87777.0,24705.0,30974.0,9914.0,27533.0,38835.0,23645.0,35324.0,119659.0,36616.0,156198.0,26015.0,64404.0,17808.0,19580.0,18840.0,31913.0,74169.0,30410.0,108936.0,45527.0,29890.0,75717.0,48139.0,80827.0,35427.0,37730.0,24960.0,21512.0,29797.0,23661.0,88109.0,39884.0,65294.0,29477.0,475594.0,107066.0,42836.0,130669.0,797159.0,42182.0,10369.0,36897.0,108978.0,34436.0,55920.0,13551.0,37877.0,5315.0,18409.0,17281.0,15410.0,19107.0,12509.0,128932.0,25968.0,12643.0,30315.0,27148.0,24616.0,18129.0,247052.0,20991.0,40307.0,19490.0,22747.0,27446.0,18993.0,7738.0,130598.0,16119.0,6976.0,165058.0,16773.0,106107.0,35069.0,8176.0,44920.0,23717.0,71951.0,25948.0,23265.0,27651.0,10145.0,8972.0,90509.0,30605.0,18185.0,14931.0,7954.0,50057.0,111723.0,12200.0,161378.0,41502.0,135982.0,49477.0,21468.0,21398.0,34604.0,24952.0,57883.0,12260.0,37780.0,26831.0,92879.0,25040.0,430459.0,21896.0,18052.0,64273.0,38982.0,43431.0,35446.0,34951.0,281912.0,57024.0,30209.0,13175.0,54624.0,149756.0,223411.0,13497.0,500631.0,1701.0,8583.0,74768.0,16527.0,91476.0,115645.0,5763.0,10674.0,717400.0,21265.0,70887.0,25537.0,37308.0,24920.0,75651.0,12147.0,133600.0,53059.0,8936.0,158983.0,38202.0,1083592.0,22454.0,18681.0,8854.0,20146.0,7842.0,17957.0,187768.0,13743.0,19776.0,211946.0,145607.0,58913.0,39928.0,8302.0,69770.0,55498.0,70060.0,282937.0,2111687.0,26360.0,25371.0,109755.0,47507.0,99821.0,59549.0,44585.0,71074.0,34966.0,291479.0,26521.0,36019.0,147548.0,150187.0,35415.0,108276.0,35427.0,47870.0,1412140.0,53619.0,39350.0,66929.0,76779.0,103461.0,27466.0,961437.0,38498.0,30954.0,81129.0,136731.0,39024.0,866228.0,65536.0,31111.0,16085.0,29108.0,35728.0,25533.0,32849.0,56240.0,30230.0,80298.0,47473.0,215499.0,61834.0,128300.0,42310.0,271126.0,462361.0,37068.0,264806.0,64274.0,122354.0,22987.0,39443.0,93182.0,15497.0,573809.0,14194.0,27749.0,82068.0,11336.0,40029.0,20488.0,31557.0,48255.0,24249.0,142585.0,40113.0,33819.0,126137.0,69330.0,61963.0,80327.0,59733.0,44915.0,367585.0,514990.0,227813.0,84090.0,31969.0,30464.0,11098.0,113909.0,62254.0,101461.0,36956.0,113269.0,22254.0,15682.0,16307.0,40750.0,14008.0,194594.0,13584.0,13084.0,34291.0,52360.0,31647.0,45088.0,15940.0,367085.0,76559.0,25690.0,41758.0,35909.0,85183.0,4590.0,90083.0,8776.0,49264.0,30339.0,18651.0,20150.0,6153.0,16588.0,67783.0,21650.0,128181.0,18878.0,97904.0,16076.0,19505.0,26993.0,80421.0,115400.0,40548.0,12321.0,3890.0,959275.0,36633.0,30226.0,31679.0,140510.0,72831.0,7107.0,32765.0,34773.0,61405.0,15600.0,175034.0,17521.0,139510.0,15079.0,50251.0,46975.0,14181.0,37157.0,103877.0,18901.0,25263.0,25617.0,17707.0,75000.0,13772.0,95328.0,304715.0,46104.0,19385.0,140320.0,73605.0]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "\"x\":\"state\",\n",
       "\"y\":\"poptotal\"\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"color\":\"light_gray\",\n",
       "\"position\":\"jitter\",\n",
       "\"geom\":\"jitter\",\n",
       "\"data\":{\n",
       "}\n",
       "}]\n",
       "};\n",
       "           var plotContainer = document.getElementById(\"C7oBBO\");\n",
       "           window.letsPlotCall(function() {{\n",
       "               LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer);\n",
       "           }});\n",
       "       })();    \n",
       "   </script>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "val p = letsPlot(data) + geomJitter(color = \"light_gray\") { x = \"state\"; y = \"poptotal\" }\n",
    "p"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "333a782f",
   "metadata": {},
   "source": [
    "#### 2. Layout Labels for Discrete Axis"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4d3a9272",
   "metadata": {},
   "source": [
    "Let's change rotation angle to check placement of labels on a discrete axis. Labels on y-axis are removed for this demo."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "02c8aa4f",
   "metadata": {},
   "source": [
    "##### 2.1. Horizontal Axis"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "94cc06f8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"A7waRp\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "       (function() {\n",
       "           var plotSpec={\n",
       "\"layout\":{\n",
       "\"name\":\"grid\",\n",
       "\"ncol\":2,\n",
       "\"nrow\":1,\n",
       "\"fit\":true,\n",
       "\"align\":false\n",
       "},\n",
       "\"figures\":[{\n",
       "\"ggtitle\":{\n",
       "\"text\":\"10°\"\n",
       "},\n",
       "\"mapping\":{\n",
       "},\n",
       "\"data\":{\n",
       "\"state\":[\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\"],\n",
       "\"poptotal\":[66090.0,10626.0,14991.0,30806.0,5836.0,35688.0,5322.0,16805.0,13437.0,173025.0,34418.0,15921.0,14460.0,33944.0,51644.0,5105067.0,19464.0,10670.0,77932.0,16516.0,19464.0,781666.0,19595.0,7440.0,31704.0,20893.0,14275.0,40319.0,38080.0,6909.0,15317.0,32337.0,8499.0,21373.0,5189.0,8096.0,51159.0,30787.0,61067.0,10609.0,37020.0,20539.0,21821.0,11347.0,317471.0,96255.0,39413.0,56393.0,516418.0,106913.0,15972.0,34392.0,39301.0,30798.0,35244.0,183241.0,129180.0,117206.0,47679.0,249238.0,41561.0,12846.0,16269.0,14752.0,11164.0,17290.0,22422.0,30728.0,36397.0,13930.0,45957.0,182827.0,21412.0,15548.0,17577.0,4373.0,7523.0,5730.0,34583.0,16545.0,148723.0,262852.0,26551.0,178386.0,7498.0,5644.0,22261.0,6534.0,48052.0,123692.0,17619.0,88257.0,13111.0,19181.0,14965.0,17241.0,16522.0,60186.0,357313.0,57733.0,252913.0,32653.0,31095.0,300836.0,63657.0,9441.0,14067.0,38147.0,14080.0,18809.0,38413.0,87777.0,24705.0,30974.0,9914.0,27533.0,38835.0,23645.0,35324.0,119659.0,36616.0,156198.0,26015.0,64404.0,17808.0,19580.0,18840.0,31913.0,74169.0,30410.0,108936.0,45527.0,29890.0,75717.0,48139.0,80827.0,35427.0,37730.0,24960.0,21512.0,29797.0,23661.0,88109.0,39884.0,65294.0,29477.0,475594.0,107066.0,42836.0,130669.0,797159.0,42182.0,10369.0,36897.0,108978.0,34436.0,55920.0,13551.0,37877.0,5315.0,18409.0,17281.0,15410.0,19107.0,12509.0,128932.0,25968.0,12643.0,30315.0,27148.0,24616.0,18129.0,247052.0,20991.0,40307.0,19490.0,22747.0,27446.0,18993.0,7738.0,130598.0,16119.0,6976.0,165058.0,16773.0,106107.0,35069.0,8176.0,44920.0,23717.0,71951.0,25948.0,23265.0,27651.0,10145.0,8972.0,90509.0,30605.0,18185.0,14931.0,7954.0,50057.0,111723.0,12200.0,161378.0,41502.0,135982.0,49477.0,21468.0,21398.0,34604.0,24952.0,57883.0,12260.0,37780.0,26831.0,92879.0,25040.0,430459.0,21896.0,18052.0,64273.0,38982.0,43431.0,35446.0,34951.0,281912.0,57024.0,30209.0,13175.0,54624.0,149756.0,223411.0,13497.0,500631.0,1701.0,8583.0,74768.0,16527.0,91476.0,115645.0,5763.0,10674.0,717400.0,21265.0,70887.0,25537.0,37308.0,24920.0,75651.0,12147.0,133600.0,53059.0,8936.0,158983.0,38202.0,1083592.0,22454.0,18681.0,8854.0,20146.0,7842.0,17957.0,187768.0,13743.0,19776.0,211946.0,145607.0,58913.0,39928.0,8302.0,69770.0,55498.0,70060.0,282937.0,2111687.0,26360.0,25371.0,109755.0,47507.0,99821.0,59549.0,44585.0,71074.0,34966.0,291479.0,26521.0,36019.0,147548.0,150187.0,35415.0,108276.0,35427.0,47870.0,1412140.0,53619.0,39350.0,66929.0,76779.0,103461.0,27466.0,961437.0,38498.0,30954.0,81129.0,136731.0,39024.0,866228.0,65536.0,31111.0,16085.0,29108.0,35728.0,25533.0,32849.0,56240.0,30230.0,80298.0,47473.0,215499.0,61834.0,128300.0,42310.0,271126.0,462361.0,37068.0,264806.0,64274.0,122354.0,22987.0,39443.0,93182.0,15497.0,573809.0,14194.0,27749.0,82068.0,11336.0,40029.0,20488.0,31557.0,48255.0,24249.0,142585.0,40113.0,33819.0,126137.0,69330.0,61963.0,80327.0,59733.0,44915.0,367585.0,514990.0,227813.0,84090.0,31969.0,30464.0,11098.0,113909.0,62254.0,101461.0,36956.0,113269.0,22254.0,15682.0,16307.0,40750.0,14008.0,194594.0,13584.0,13084.0,34291.0,52360.0,31647.0,45088.0,15940.0,367085.0,76559.0,25690.0,41758.0,35909.0,85183.0,4590.0,90083.0,8776.0,49264.0,30339.0,18651.0,20150.0,6153.0,16588.0,67783.0,21650.0,128181.0,18878.0,97904.0,16076.0,19505.0,26993.0,80421.0,115400.0,40548.0,12321.0,3890.0,959275.0,36633.0,30226.0,31679.0,140510.0,72831.0,7107.0,32765.0,34773.0,61405.0,15600.0,175034.0,17521.0,139510.0,15079.0,50251.0,46975.0,14181.0,37157.0,103877.0,18901.0,25263.0,25617.0,17707.0,75000.0,13772.0,95328.0,304715.0,46104.0,19385.0,140320.0,73605.0]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[{\n",
       "\"aesthetic\":\"x\",\n",
       "\"discrete\":true,\n",
       "\"position\":\"both\"\n",
       "}],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "\"x\":\"state\",\n",
       "\"y\":\"poptotal\"\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"color\":\"light_gray\",\n",
       "\"position\":\"jitter\",\n",
       "\"geom\":\"jitter\",\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"axis_text_y\":{\n",
       "\"blank\":true\n",
       "},\n",
       "\"axis_text\":{\n",
       "\"angle\":10.0,\n",
       "\"blank\":false,\n",
       "\"color\":\"blue\"\n",
       "},\n",
       "\"text\":{\n",
       "\"color\":\"gray\",\n",
       "\"size\":13.0,\n",
       "\"blank\":false\n",
       "}\n",
       "}\n",
       "},{\n",
       "\"ggtitle\":{\n",
       "\"text\":\"90°\"\n",
       "},\n",
       "\"mapping\":{\n",
       "},\n",
       "\"data\":{\n",
       "\"state\":[\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\"],\n",
       "\"poptotal\":[66090.0,10626.0,14991.0,30806.0,5836.0,35688.0,5322.0,16805.0,13437.0,173025.0,34418.0,15921.0,14460.0,33944.0,51644.0,5105067.0,19464.0,10670.0,77932.0,16516.0,19464.0,781666.0,19595.0,7440.0,31704.0,20893.0,14275.0,40319.0,38080.0,6909.0,15317.0,32337.0,8499.0,21373.0,5189.0,8096.0,51159.0,30787.0,61067.0,10609.0,37020.0,20539.0,21821.0,11347.0,317471.0,96255.0,39413.0,56393.0,516418.0,106913.0,15972.0,34392.0,39301.0,30798.0,35244.0,183241.0,129180.0,117206.0,47679.0,249238.0,41561.0,12846.0,16269.0,14752.0,11164.0,17290.0,22422.0,30728.0,36397.0,13930.0,45957.0,182827.0,21412.0,15548.0,17577.0,4373.0,7523.0,5730.0,34583.0,16545.0,148723.0,262852.0,26551.0,178386.0,7498.0,5644.0,22261.0,6534.0,48052.0,123692.0,17619.0,88257.0,13111.0,19181.0,14965.0,17241.0,16522.0,60186.0,357313.0,57733.0,252913.0,32653.0,31095.0,300836.0,63657.0,9441.0,14067.0,38147.0,14080.0,18809.0,38413.0,87777.0,24705.0,30974.0,9914.0,27533.0,38835.0,23645.0,35324.0,119659.0,36616.0,156198.0,26015.0,64404.0,17808.0,19580.0,18840.0,31913.0,74169.0,30410.0,108936.0,45527.0,29890.0,75717.0,48139.0,80827.0,35427.0,37730.0,24960.0,21512.0,29797.0,23661.0,88109.0,39884.0,65294.0,29477.0,475594.0,107066.0,42836.0,130669.0,797159.0,42182.0,10369.0,36897.0,108978.0,34436.0,55920.0,13551.0,37877.0,5315.0,18409.0,17281.0,15410.0,19107.0,12509.0,128932.0,25968.0,12643.0,30315.0,27148.0,24616.0,18129.0,247052.0,20991.0,40307.0,19490.0,22747.0,27446.0,18993.0,7738.0,130598.0,16119.0,6976.0,165058.0,16773.0,106107.0,35069.0,8176.0,44920.0,23717.0,71951.0,25948.0,23265.0,27651.0,10145.0,8972.0,90509.0,30605.0,18185.0,14931.0,7954.0,50057.0,111723.0,12200.0,161378.0,41502.0,135982.0,49477.0,21468.0,21398.0,34604.0,24952.0,57883.0,12260.0,37780.0,26831.0,92879.0,25040.0,430459.0,21896.0,18052.0,64273.0,38982.0,43431.0,35446.0,34951.0,281912.0,57024.0,30209.0,13175.0,54624.0,149756.0,223411.0,13497.0,500631.0,1701.0,8583.0,74768.0,16527.0,91476.0,115645.0,5763.0,10674.0,717400.0,21265.0,70887.0,25537.0,37308.0,24920.0,75651.0,12147.0,133600.0,53059.0,8936.0,158983.0,38202.0,1083592.0,22454.0,18681.0,8854.0,20146.0,7842.0,17957.0,187768.0,13743.0,19776.0,211946.0,145607.0,58913.0,39928.0,8302.0,69770.0,55498.0,70060.0,282937.0,2111687.0,26360.0,25371.0,109755.0,47507.0,99821.0,59549.0,44585.0,71074.0,34966.0,291479.0,26521.0,36019.0,147548.0,150187.0,35415.0,108276.0,35427.0,47870.0,1412140.0,53619.0,39350.0,66929.0,76779.0,103461.0,27466.0,961437.0,38498.0,30954.0,81129.0,136731.0,39024.0,866228.0,65536.0,31111.0,16085.0,29108.0,35728.0,25533.0,32849.0,56240.0,30230.0,80298.0,47473.0,215499.0,61834.0,128300.0,42310.0,271126.0,462361.0,37068.0,264806.0,64274.0,122354.0,22987.0,39443.0,93182.0,15497.0,573809.0,14194.0,27749.0,82068.0,11336.0,40029.0,20488.0,31557.0,48255.0,24249.0,142585.0,40113.0,33819.0,126137.0,69330.0,61963.0,80327.0,59733.0,44915.0,367585.0,514990.0,227813.0,84090.0,31969.0,30464.0,11098.0,113909.0,62254.0,101461.0,36956.0,113269.0,22254.0,15682.0,16307.0,40750.0,14008.0,194594.0,13584.0,13084.0,34291.0,52360.0,31647.0,45088.0,15940.0,367085.0,76559.0,25690.0,41758.0,35909.0,85183.0,4590.0,90083.0,8776.0,49264.0,30339.0,18651.0,20150.0,6153.0,16588.0,67783.0,21650.0,128181.0,18878.0,97904.0,16076.0,19505.0,26993.0,80421.0,115400.0,40548.0,12321.0,3890.0,959275.0,36633.0,30226.0,31679.0,140510.0,72831.0,7107.0,32765.0,34773.0,61405.0,15600.0,175034.0,17521.0,139510.0,15079.0,50251.0,46975.0,14181.0,37157.0,103877.0,18901.0,25263.0,25617.0,17707.0,75000.0,13772.0,95328.0,304715.0,46104.0,19385.0,140320.0,73605.0]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[{\n",
       "\"aesthetic\":\"x\",\n",
       "\"discrete\":true,\n",
       "\"position\":\"both\"\n",
       "}],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "\"x\":\"state\",\n",
       "\"y\":\"poptotal\"\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"color\":\"light_gray\",\n",
       "\"position\":\"jitter\",\n",
       "\"geom\":\"jitter\",\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"axis_text_y\":{\n",
       "\"blank\":true\n",
       "},\n",
       "\"axis_text\":{\n",
       "\"angle\":90.0,\n",
       "\"blank\":false,\n",
       "\"color\":\"blue\"\n",
       "},\n",
       "\"text\":{\n",
       "\"color\":\"gray\",\n",
       "\"size\":13.0,\n",
       "\"blank\":false\n",
       "}\n",
       "}\n",
       "}],\n",
       "\"ggsize\":{\n",
       "\"width\":800.0,\n",
       "\"height\":300.0\n",
       "},\n",
       "\"kind\":\"subplots\"\n",
       "};\n",
       "           var plotContainer = document.getElementById(\"A7waRp\");\n",
       "           window.letsPlotCall(function() {{\n",
       "               LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer);\n",
       "           }});\n",
       "       })();    \n",
       "   </script>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "val xBothPlot = p + theme(axisTextY=elementBlank()) + scaleXDiscrete(position=\"both\")\n",
    "\n",
    "gggrid(\n",
    "    plots = listOf(\n",
    "        xBothPlot + theme(axisText=elementText(angle=10)) + highlightAxisLabels + ggtitle(\"10°\"),\n",
    "        xBothPlot + theme(axisText=elementText(angle=90)) + highlightAxisLabels + ggtitle(\"90°\")\n",
    "    ), \n",
    "    ncol = 2, \n",
    ") + ggsize(800, 300)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b1df725d",
   "metadata": {},
   "source": [
    "##### 2.2. Vertical Axis"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e11f4745",
   "metadata": {},
   "source": [
    "When the rotation angle is set to 90°, some labels are not displayed to avoid overlapping."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "d4601b40",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"LQ4wls\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "       (function() {\n",
       "           var plotSpec={\n",
       "\"layout\":{\n",
       "\"name\":\"grid\",\n",
       "\"ncol\":2,\n",
       "\"nrow\":1,\n",
       "\"fit\":true,\n",
       "\"align\":false\n",
       "},\n",
       "\"figures\":[{\n",
       "\"ggtitle\":{\n",
       "\"text\":\"10°\"\n",
       "},\n",
       "\"mapping\":{\n",
       "},\n",
       "\"coord\":{\n",
       "\"name\":\"flip\",\n",
       "\"flip\":true\n",
       "},\n",
       "\"data\":{\n",
       "\"state\":[\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\"],\n",
       "\"poptotal\":[66090.0,10626.0,14991.0,30806.0,5836.0,35688.0,5322.0,16805.0,13437.0,173025.0,34418.0,15921.0,14460.0,33944.0,51644.0,5105067.0,19464.0,10670.0,77932.0,16516.0,19464.0,781666.0,19595.0,7440.0,31704.0,20893.0,14275.0,40319.0,38080.0,6909.0,15317.0,32337.0,8499.0,21373.0,5189.0,8096.0,51159.0,30787.0,61067.0,10609.0,37020.0,20539.0,21821.0,11347.0,317471.0,96255.0,39413.0,56393.0,516418.0,106913.0,15972.0,34392.0,39301.0,30798.0,35244.0,183241.0,129180.0,117206.0,47679.0,249238.0,41561.0,12846.0,16269.0,14752.0,11164.0,17290.0,22422.0,30728.0,36397.0,13930.0,45957.0,182827.0,21412.0,15548.0,17577.0,4373.0,7523.0,5730.0,34583.0,16545.0,148723.0,262852.0,26551.0,178386.0,7498.0,5644.0,22261.0,6534.0,48052.0,123692.0,17619.0,88257.0,13111.0,19181.0,14965.0,17241.0,16522.0,60186.0,357313.0,57733.0,252913.0,32653.0,31095.0,300836.0,63657.0,9441.0,14067.0,38147.0,14080.0,18809.0,38413.0,87777.0,24705.0,30974.0,9914.0,27533.0,38835.0,23645.0,35324.0,119659.0,36616.0,156198.0,26015.0,64404.0,17808.0,19580.0,18840.0,31913.0,74169.0,30410.0,108936.0,45527.0,29890.0,75717.0,48139.0,80827.0,35427.0,37730.0,24960.0,21512.0,29797.0,23661.0,88109.0,39884.0,65294.0,29477.0,475594.0,107066.0,42836.0,130669.0,797159.0,42182.0,10369.0,36897.0,108978.0,34436.0,55920.0,13551.0,37877.0,5315.0,18409.0,17281.0,15410.0,19107.0,12509.0,128932.0,25968.0,12643.0,30315.0,27148.0,24616.0,18129.0,247052.0,20991.0,40307.0,19490.0,22747.0,27446.0,18993.0,7738.0,130598.0,16119.0,6976.0,165058.0,16773.0,106107.0,35069.0,8176.0,44920.0,23717.0,71951.0,25948.0,23265.0,27651.0,10145.0,8972.0,90509.0,30605.0,18185.0,14931.0,7954.0,50057.0,111723.0,12200.0,161378.0,41502.0,135982.0,49477.0,21468.0,21398.0,34604.0,24952.0,57883.0,12260.0,37780.0,26831.0,92879.0,25040.0,430459.0,21896.0,18052.0,64273.0,38982.0,43431.0,35446.0,34951.0,281912.0,57024.0,30209.0,13175.0,54624.0,149756.0,223411.0,13497.0,500631.0,1701.0,8583.0,74768.0,16527.0,91476.0,115645.0,5763.0,10674.0,717400.0,21265.0,70887.0,25537.0,37308.0,24920.0,75651.0,12147.0,133600.0,53059.0,8936.0,158983.0,38202.0,1083592.0,22454.0,18681.0,8854.0,20146.0,7842.0,17957.0,187768.0,13743.0,19776.0,211946.0,145607.0,58913.0,39928.0,8302.0,69770.0,55498.0,70060.0,282937.0,2111687.0,26360.0,25371.0,109755.0,47507.0,99821.0,59549.0,44585.0,71074.0,34966.0,291479.0,26521.0,36019.0,147548.0,150187.0,35415.0,108276.0,35427.0,47870.0,1412140.0,53619.0,39350.0,66929.0,76779.0,103461.0,27466.0,961437.0,38498.0,30954.0,81129.0,136731.0,39024.0,866228.0,65536.0,31111.0,16085.0,29108.0,35728.0,25533.0,32849.0,56240.0,30230.0,80298.0,47473.0,215499.0,61834.0,128300.0,42310.0,271126.0,462361.0,37068.0,264806.0,64274.0,122354.0,22987.0,39443.0,93182.0,15497.0,573809.0,14194.0,27749.0,82068.0,11336.0,40029.0,20488.0,31557.0,48255.0,24249.0,142585.0,40113.0,33819.0,126137.0,69330.0,61963.0,80327.0,59733.0,44915.0,367585.0,514990.0,227813.0,84090.0,31969.0,30464.0,11098.0,113909.0,62254.0,101461.0,36956.0,113269.0,22254.0,15682.0,16307.0,40750.0,14008.0,194594.0,13584.0,13084.0,34291.0,52360.0,31647.0,45088.0,15940.0,367085.0,76559.0,25690.0,41758.0,35909.0,85183.0,4590.0,90083.0,8776.0,49264.0,30339.0,18651.0,20150.0,6153.0,16588.0,67783.0,21650.0,128181.0,18878.0,97904.0,16076.0,19505.0,26993.0,80421.0,115400.0,40548.0,12321.0,3890.0,959275.0,36633.0,30226.0,31679.0,140510.0,72831.0,7107.0,32765.0,34773.0,61405.0,15600.0,175034.0,17521.0,139510.0,15079.0,50251.0,46975.0,14181.0,37157.0,103877.0,18901.0,25263.0,25617.0,17707.0,75000.0,13772.0,95328.0,304715.0,46104.0,19385.0,140320.0,73605.0]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[{\n",
       "\"aesthetic\":\"x\",\n",
       "\"discrete\":true,\n",
       "\"position\":\"both\"\n",
       "}],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "\"x\":\"state\",\n",
       "\"y\":\"poptotal\"\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"color\":\"light_gray\",\n",
       "\"position\":\"jitter\",\n",
       "\"geom\":\"jitter\",\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"axis_text_y\":{\n",
       "\"blank\":true\n",
       "},\n",
       "\"axis_text\":{\n",
       "\"angle\":10.0,\n",
       "\"blank\":false,\n",
       "\"color\":\"blue\"\n",
       "},\n",
       "\"text\":{\n",
       "\"color\":\"gray\",\n",
       "\"size\":13.0,\n",
       "\"blank\":false\n",
       "}\n",
       "}\n",
       "},{\n",
       "\"ggtitle\":{\n",
       "\"text\":\"90°\"\n",
       "},\n",
       "\"mapping\":{\n",
       "},\n",
       "\"coord\":{\n",
       "\"name\":\"flip\",\n",
       "\"flip\":true\n",
       "},\n",
       "\"data\":{\n",
       "\"state\":[\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\"],\n",
       "\"poptotal\":[66090.0,10626.0,14991.0,30806.0,5836.0,35688.0,5322.0,16805.0,13437.0,173025.0,34418.0,15921.0,14460.0,33944.0,51644.0,5105067.0,19464.0,10670.0,77932.0,16516.0,19464.0,781666.0,19595.0,7440.0,31704.0,20893.0,14275.0,40319.0,38080.0,6909.0,15317.0,32337.0,8499.0,21373.0,5189.0,8096.0,51159.0,30787.0,61067.0,10609.0,37020.0,20539.0,21821.0,11347.0,317471.0,96255.0,39413.0,56393.0,516418.0,106913.0,15972.0,34392.0,39301.0,30798.0,35244.0,183241.0,129180.0,117206.0,47679.0,249238.0,41561.0,12846.0,16269.0,14752.0,11164.0,17290.0,22422.0,30728.0,36397.0,13930.0,45957.0,182827.0,21412.0,15548.0,17577.0,4373.0,7523.0,5730.0,34583.0,16545.0,148723.0,262852.0,26551.0,178386.0,7498.0,5644.0,22261.0,6534.0,48052.0,123692.0,17619.0,88257.0,13111.0,19181.0,14965.0,17241.0,16522.0,60186.0,357313.0,57733.0,252913.0,32653.0,31095.0,300836.0,63657.0,9441.0,14067.0,38147.0,14080.0,18809.0,38413.0,87777.0,24705.0,30974.0,9914.0,27533.0,38835.0,23645.0,35324.0,119659.0,36616.0,156198.0,26015.0,64404.0,17808.0,19580.0,18840.0,31913.0,74169.0,30410.0,108936.0,45527.0,29890.0,75717.0,48139.0,80827.0,35427.0,37730.0,24960.0,21512.0,29797.0,23661.0,88109.0,39884.0,65294.0,29477.0,475594.0,107066.0,42836.0,130669.0,797159.0,42182.0,10369.0,36897.0,108978.0,34436.0,55920.0,13551.0,37877.0,5315.0,18409.0,17281.0,15410.0,19107.0,12509.0,128932.0,25968.0,12643.0,30315.0,27148.0,24616.0,18129.0,247052.0,20991.0,40307.0,19490.0,22747.0,27446.0,18993.0,7738.0,130598.0,16119.0,6976.0,165058.0,16773.0,106107.0,35069.0,8176.0,44920.0,23717.0,71951.0,25948.0,23265.0,27651.0,10145.0,8972.0,90509.0,30605.0,18185.0,14931.0,7954.0,50057.0,111723.0,12200.0,161378.0,41502.0,135982.0,49477.0,21468.0,21398.0,34604.0,24952.0,57883.0,12260.0,37780.0,26831.0,92879.0,25040.0,430459.0,21896.0,18052.0,64273.0,38982.0,43431.0,35446.0,34951.0,281912.0,57024.0,30209.0,13175.0,54624.0,149756.0,223411.0,13497.0,500631.0,1701.0,8583.0,74768.0,16527.0,91476.0,115645.0,5763.0,10674.0,717400.0,21265.0,70887.0,25537.0,37308.0,24920.0,75651.0,12147.0,133600.0,53059.0,8936.0,158983.0,38202.0,1083592.0,22454.0,18681.0,8854.0,20146.0,7842.0,17957.0,187768.0,13743.0,19776.0,211946.0,145607.0,58913.0,39928.0,8302.0,69770.0,55498.0,70060.0,282937.0,2111687.0,26360.0,25371.0,109755.0,47507.0,99821.0,59549.0,44585.0,71074.0,34966.0,291479.0,26521.0,36019.0,147548.0,150187.0,35415.0,108276.0,35427.0,47870.0,1412140.0,53619.0,39350.0,66929.0,76779.0,103461.0,27466.0,961437.0,38498.0,30954.0,81129.0,136731.0,39024.0,866228.0,65536.0,31111.0,16085.0,29108.0,35728.0,25533.0,32849.0,56240.0,30230.0,80298.0,47473.0,215499.0,61834.0,128300.0,42310.0,271126.0,462361.0,37068.0,264806.0,64274.0,122354.0,22987.0,39443.0,93182.0,15497.0,573809.0,14194.0,27749.0,82068.0,11336.0,40029.0,20488.0,31557.0,48255.0,24249.0,142585.0,40113.0,33819.0,126137.0,69330.0,61963.0,80327.0,59733.0,44915.0,367585.0,514990.0,227813.0,84090.0,31969.0,30464.0,11098.0,113909.0,62254.0,101461.0,36956.0,113269.0,22254.0,15682.0,16307.0,40750.0,14008.0,194594.0,13584.0,13084.0,34291.0,52360.0,31647.0,45088.0,15940.0,367085.0,76559.0,25690.0,41758.0,35909.0,85183.0,4590.0,90083.0,8776.0,49264.0,30339.0,18651.0,20150.0,6153.0,16588.0,67783.0,21650.0,128181.0,18878.0,97904.0,16076.0,19505.0,26993.0,80421.0,115400.0,40548.0,12321.0,3890.0,959275.0,36633.0,30226.0,31679.0,140510.0,72831.0,7107.0,32765.0,34773.0,61405.0,15600.0,175034.0,17521.0,139510.0,15079.0,50251.0,46975.0,14181.0,37157.0,103877.0,18901.0,25263.0,25617.0,17707.0,75000.0,13772.0,95328.0,304715.0,46104.0,19385.0,140320.0,73605.0]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[{\n",
       "\"aesthetic\":\"x\",\n",
       "\"discrete\":true,\n",
       "\"position\":\"both\"\n",
       "}],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "\"x\":\"state\",\n",
       "\"y\":\"poptotal\"\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"color\":\"light_gray\",\n",
       "\"position\":\"jitter\",\n",
       "\"geom\":\"jitter\",\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"axis_text_y\":{\n",
       "\"blank\":true\n",
       "},\n",
       "\"axis_text\":{\n",
       "\"angle\":90.0,\n",
       "\"blank\":false,\n",
       "\"color\":\"blue\"\n",
       "},\n",
       "\"text\":{\n",
       "\"color\":\"gray\",\n",
       "\"size\":13.0,\n",
       "\"blank\":false\n",
       "}\n",
       "}\n",
       "}],\n",
       "\"ggsize\":{\n",
       "\"width\":800.0,\n",
       "\"height\":300.0\n",
       "},\n",
       "\"kind\":\"subplots\"\n",
       "};\n",
       "           var plotContainer = document.getElementById(\"LQ4wls\");\n",
       "           window.letsPlotCall(function() {{\n",
       "               LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer);\n",
       "           }});\n",
       "       })();    \n",
       "   </script>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gggrid(\n",
    "    plots = listOf(\n",
    "        xBothPlot + coordFlip() + theme(axisText=elementText(angle=10)) + highlightAxisLabels + ggtitle(\"10°\"),\n",
    "        xBothPlot + coordFlip() + theme(axisText=elementText(angle=90)) + highlightAxisLabels + ggtitle(\"90°\")\n",
    "    ), \n",
    "    ncol = 2, \n",
    ") + ggsize(800, 300)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9b64a792",
   "metadata": {},
   "source": [
    "#### 3. Layout Labels for Continuous Axis"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c4d19f4b",
   "metadata": {},
   "source": [
    "For continuous axis the number of labels varies depending on how many it can fit."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f941294f",
   "metadata": {},
   "source": [
    "##### 3.1. Horizontal Axis"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f622b831",
   "metadata": {},
   "source": [
    "Changing the angle of rotation changes the number of labels on the axis:\n",
    "90° rotation allows to place more labels on the horizontal axis."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "c56c0d96",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"buz74B\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "       (function() {\n",
       "           var plotSpec={\n",
       "\"layout\":{\n",
       "\"name\":\"grid\",\n",
       "\"ncol\":2,\n",
       "\"nrow\":1,\n",
       "\"fit\":true,\n",
       "\"align\":false\n",
       "},\n",
       "\"figures\":[{\n",
       "\"ggtitle\":{\n",
       "\"text\":\"10°\"\n",
       "},\n",
       "\"mapping\":{\n",
       "},\n",
       "\"coord\":{\n",
       "\"name\":\"flip\",\n",
       "\"flip\":true\n",
       "},\n",
       "\"data\":{\n",
       "\"state\":[\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\"],\n",
       "\"poptotal\":[66090.0,10626.0,14991.0,30806.0,5836.0,35688.0,5322.0,16805.0,13437.0,173025.0,34418.0,15921.0,14460.0,33944.0,51644.0,5105067.0,19464.0,10670.0,77932.0,16516.0,19464.0,781666.0,19595.0,7440.0,31704.0,20893.0,14275.0,40319.0,38080.0,6909.0,15317.0,32337.0,8499.0,21373.0,5189.0,8096.0,51159.0,30787.0,61067.0,10609.0,37020.0,20539.0,21821.0,11347.0,317471.0,96255.0,39413.0,56393.0,516418.0,106913.0,15972.0,34392.0,39301.0,30798.0,35244.0,183241.0,129180.0,117206.0,47679.0,249238.0,41561.0,12846.0,16269.0,14752.0,11164.0,17290.0,22422.0,30728.0,36397.0,13930.0,45957.0,182827.0,21412.0,15548.0,17577.0,4373.0,7523.0,5730.0,34583.0,16545.0,148723.0,262852.0,26551.0,178386.0,7498.0,5644.0,22261.0,6534.0,48052.0,123692.0,17619.0,88257.0,13111.0,19181.0,14965.0,17241.0,16522.0,60186.0,357313.0,57733.0,252913.0,32653.0,31095.0,300836.0,63657.0,9441.0,14067.0,38147.0,14080.0,18809.0,38413.0,87777.0,24705.0,30974.0,9914.0,27533.0,38835.0,23645.0,35324.0,119659.0,36616.0,156198.0,26015.0,64404.0,17808.0,19580.0,18840.0,31913.0,74169.0,30410.0,108936.0,45527.0,29890.0,75717.0,48139.0,80827.0,35427.0,37730.0,24960.0,21512.0,29797.0,23661.0,88109.0,39884.0,65294.0,29477.0,475594.0,107066.0,42836.0,130669.0,797159.0,42182.0,10369.0,36897.0,108978.0,34436.0,55920.0,13551.0,37877.0,5315.0,18409.0,17281.0,15410.0,19107.0,12509.0,128932.0,25968.0,12643.0,30315.0,27148.0,24616.0,18129.0,247052.0,20991.0,40307.0,19490.0,22747.0,27446.0,18993.0,7738.0,130598.0,16119.0,6976.0,165058.0,16773.0,106107.0,35069.0,8176.0,44920.0,23717.0,71951.0,25948.0,23265.0,27651.0,10145.0,8972.0,90509.0,30605.0,18185.0,14931.0,7954.0,50057.0,111723.0,12200.0,161378.0,41502.0,135982.0,49477.0,21468.0,21398.0,34604.0,24952.0,57883.0,12260.0,37780.0,26831.0,92879.0,25040.0,430459.0,21896.0,18052.0,64273.0,38982.0,43431.0,35446.0,34951.0,281912.0,57024.0,30209.0,13175.0,54624.0,149756.0,223411.0,13497.0,500631.0,1701.0,8583.0,74768.0,16527.0,91476.0,115645.0,5763.0,10674.0,717400.0,21265.0,70887.0,25537.0,37308.0,24920.0,75651.0,12147.0,133600.0,53059.0,8936.0,158983.0,38202.0,1083592.0,22454.0,18681.0,8854.0,20146.0,7842.0,17957.0,187768.0,13743.0,19776.0,211946.0,145607.0,58913.0,39928.0,8302.0,69770.0,55498.0,70060.0,282937.0,2111687.0,26360.0,25371.0,109755.0,47507.0,99821.0,59549.0,44585.0,71074.0,34966.0,291479.0,26521.0,36019.0,147548.0,150187.0,35415.0,108276.0,35427.0,47870.0,1412140.0,53619.0,39350.0,66929.0,76779.0,103461.0,27466.0,961437.0,38498.0,30954.0,81129.0,136731.0,39024.0,866228.0,65536.0,31111.0,16085.0,29108.0,35728.0,25533.0,32849.0,56240.0,30230.0,80298.0,47473.0,215499.0,61834.0,128300.0,42310.0,271126.0,462361.0,37068.0,264806.0,64274.0,122354.0,22987.0,39443.0,93182.0,15497.0,573809.0,14194.0,27749.0,82068.0,11336.0,40029.0,20488.0,31557.0,48255.0,24249.0,142585.0,40113.0,33819.0,126137.0,69330.0,61963.0,80327.0,59733.0,44915.0,367585.0,514990.0,227813.0,84090.0,31969.0,30464.0,11098.0,113909.0,62254.0,101461.0,36956.0,113269.0,22254.0,15682.0,16307.0,40750.0,14008.0,194594.0,13584.0,13084.0,34291.0,52360.0,31647.0,45088.0,15940.0,367085.0,76559.0,25690.0,41758.0,35909.0,85183.0,4590.0,90083.0,8776.0,49264.0,30339.0,18651.0,20150.0,6153.0,16588.0,67783.0,21650.0,128181.0,18878.0,97904.0,16076.0,19505.0,26993.0,80421.0,115400.0,40548.0,12321.0,3890.0,959275.0,36633.0,30226.0,31679.0,140510.0,72831.0,7107.0,32765.0,34773.0,61405.0,15600.0,175034.0,17521.0,139510.0,15079.0,50251.0,46975.0,14181.0,37157.0,103877.0,18901.0,25263.0,25617.0,17707.0,75000.0,13772.0,95328.0,304715.0,46104.0,19385.0,140320.0,73605.0]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[{\n",
       "\"aesthetic\":\"y\",\n",
       "\"position\":\"both\"\n",
       "}],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "\"x\":\"state\",\n",
       "\"y\":\"poptotal\"\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"color\":\"light_gray\",\n",
       "\"position\":\"jitter\",\n",
       "\"geom\":\"jitter\",\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"axis_text_x\":{\n",
       "\"blank\":true\n",
       "},\n",
       "\"axis_text\":{\n",
       "\"angle\":10.0,\n",
       "\"blank\":false,\n",
       "\"color\":\"blue\"\n",
       "},\n",
       "\"text\":{\n",
       "\"color\":\"gray\",\n",
       "\"size\":13.0,\n",
       "\"blank\":false\n",
       "}\n",
       "}\n",
       "},{\n",
       "\"ggtitle\":{\n",
       "\"text\":\"90°\"\n",
       "},\n",
       "\"mapping\":{\n",
       "},\n",
       "\"coord\":{\n",
       "\"name\":\"flip\",\n",
       "\"flip\":true\n",
       "},\n",
       "\"data\":{\n",
       "\"state\":[\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\"],\n",
       "\"poptotal\":[66090.0,10626.0,14991.0,30806.0,5836.0,35688.0,5322.0,16805.0,13437.0,173025.0,34418.0,15921.0,14460.0,33944.0,51644.0,5105067.0,19464.0,10670.0,77932.0,16516.0,19464.0,781666.0,19595.0,7440.0,31704.0,20893.0,14275.0,40319.0,38080.0,6909.0,15317.0,32337.0,8499.0,21373.0,5189.0,8096.0,51159.0,30787.0,61067.0,10609.0,37020.0,20539.0,21821.0,11347.0,317471.0,96255.0,39413.0,56393.0,516418.0,106913.0,15972.0,34392.0,39301.0,30798.0,35244.0,183241.0,129180.0,117206.0,47679.0,249238.0,41561.0,12846.0,16269.0,14752.0,11164.0,17290.0,22422.0,30728.0,36397.0,13930.0,45957.0,182827.0,21412.0,15548.0,17577.0,4373.0,7523.0,5730.0,34583.0,16545.0,148723.0,262852.0,26551.0,178386.0,7498.0,5644.0,22261.0,6534.0,48052.0,123692.0,17619.0,88257.0,13111.0,19181.0,14965.0,17241.0,16522.0,60186.0,357313.0,57733.0,252913.0,32653.0,31095.0,300836.0,63657.0,9441.0,14067.0,38147.0,14080.0,18809.0,38413.0,87777.0,24705.0,30974.0,9914.0,27533.0,38835.0,23645.0,35324.0,119659.0,36616.0,156198.0,26015.0,64404.0,17808.0,19580.0,18840.0,31913.0,74169.0,30410.0,108936.0,45527.0,29890.0,75717.0,48139.0,80827.0,35427.0,37730.0,24960.0,21512.0,29797.0,23661.0,88109.0,39884.0,65294.0,29477.0,475594.0,107066.0,42836.0,130669.0,797159.0,42182.0,10369.0,36897.0,108978.0,34436.0,55920.0,13551.0,37877.0,5315.0,18409.0,17281.0,15410.0,19107.0,12509.0,128932.0,25968.0,12643.0,30315.0,27148.0,24616.0,18129.0,247052.0,20991.0,40307.0,19490.0,22747.0,27446.0,18993.0,7738.0,130598.0,16119.0,6976.0,165058.0,16773.0,106107.0,35069.0,8176.0,44920.0,23717.0,71951.0,25948.0,23265.0,27651.0,10145.0,8972.0,90509.0,30605.0,18185.0,14931.0,7954.0,50057.0,111723.0,12200.0,161378.0,41502.0,135982.0,49477.0,21468.0,21398.0,34604.0,24952.0,57883.0,12260.0,37780.0,26831.0,92879.0,25040.0,430459.0,21896.0,18052.0,64273.0,38982.0,43431.0,35446.0,34951.0,281912.0,57024.0,30209.0,13175.0,54624.0,149756.0,223411.0,13497.0,500631.0,1701.0,8583.0,74768.0,16527.0,91476.0,115645.0,5763.0,10674.0,717400.0,21265.0,70887.0,25537.0,37308.0,24920.0,75651.0,12147.0,133600.0,53059.0,8936.0,158983.0,38202.0,1083592.0,22454.0,18681.0,8854.0,20146.0,7842.0,17957.0,187768.0,13743.0,19776.0,211946.0,145607.0,58913.0,39928.0,8302.0,69770.0,55498.0,70060.0,282937.0,2111687.0,26360.0,25371.0,109755.0,47507.0,99821.0,59549.0,44585.0,71074.0,34966.0,291479.0,26521.0,36019.0,147548.0,150187.0,35415.0,108276.0,35427.0,47870.0,1412140.0,53619.0,39350.0,66929.0,76779.0,103461.0,27466.0,961437.0,38498.0,30954.0,81129.0,136731.0,39024.0,866228.0,65536.0,31111.0,16085.0,29108.0,35728.0,25533.0,32849.0,56240.0,30230.0,80298.0,47473.0,215499.0,61834.0,128300.0,42310.0,271126.0,462361.0,37068.0,264806.0,64274.0,122354.0,22987.0,39443.0,93182.0,15497.0,573809.0,14194.0,27749.0,82068.0,11336.0,40029.0,20488.0,31557.0,48255.0,24249.0,142585.0,40113.0,33819.0,126137.0,69330.0,61963.0,80327.0,59733.0,44915.0,367585.0,514990.0,227813.0,84090.0,31969.0,30464.0,11098.0,113909.0,62254.0,101461.0,36956.0,113269.0,22254.0,15682.0,16307.0,40750.0,14008.0,194594.0,13584.0,13084.0,34291.0,52360.0,31647.0,45088.0,15940.0,367085.0,76559.0,25690.0,41758.0,35909.0,85183.0,4590.0,90083.0,8776.0,49264.0,30339.0,18651.0,20150.0,6153.0,16588.0,67783.0,21650.0,128181.0,18878.0,97904.0,16076.0,19505.0,26993.0,80421.0,115400.0,40548.0,12321.0,3890.0,959275.0,36633.0,30226.0,31679.0,140510.0,72831.0,7107.0,32765.0,34773.0,61405.0,15600.0,175034.0,17521.0,139510.0,15079.0,50251.0,46975.0,14181.0,37157.0,103877.0,18901.0,25263.0,25617.0,17707.0,75000.0,13772.0,95328.0,304715.0,46104.0,19385.0,140320.0,73605.0]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[{\n",
       "\"aesthetic\":\"y\",\n",
       "\"position\":\"both\"\n",
       "}],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "\"x\":\"state\",\n",
       "\"y\":\"poptotal\"\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"color\":\"light_gray\",\n",
       "\"position\":\"jitter\",\n",
       "\"geom\":\"jitter\",\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"axis_text_x\":{\n",
       "\"blank\":true\n",
       "},\n",
       "\"axis_text\":{\n",
       "\"angle\":90.0,\n",
       "\"blank\":false,\n",
       "\"color\":\"blue\"\n",
       "},\n",
       "\"text\":{\n",
       "\"color\":\"gray\",\n",
       "\"size\":13.0,\n",
       "\"blank\":false\n",
       "}\n",
       "}\n",
       "}],\n",
       "\"ggsize\":{\n",
       "\"width\":800.0,\n",
       "\"height\":300.0\n",
       "},\n",
       "\"kind\":\"subplots\"\n",
       "};\n",
       "           var plotContainer = document.getElementById(\"buz74B\");\n",
       "           window.letsPlotCall(function() {{\n",
       "               LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer);\n",
       "           }});\n",
       "       })();    \n",
       "   </script>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "val yBothPlot = p + theme(axisTextX=elementBlank()) + scaleYContinuous(position=\"both\")\n",
    "\n",
    "gggrid(\n",
    "    plots = listOf(\n",
    "        yBothPlot + coordFlip() + theme(axisText=elementText(angle=10)) + highlightAxisLabels + ggtitle(\"10°\"),\n",
    "        yBothPlot + coordFlip() + theme(axisText=elementText(angle=90)) + highlightAxisLabels + ggtitle(\"90°\")\n",
    "    ), \n",
    "    ncol = 2, \n",
    ") + ggsize(800, 300)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "28508449",
   "metadata": {},
   "source": [
    "##### 3.2. Vertical Axis"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "725166ad",
   "metadata": {},
   "source": [
    "By changing the angle of rotation, thereby increasing the label heights, we get a reduction in the total number of labels on the vertical axis."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "4830c93a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"k1JCQC\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "       (function() {\n",
       "           var plotSpec={\n",
       "\"layout\":{\n",
       "\"name\":\"grid\",\n",
       "\"ncol\":2,\n",
       "\"nrow\":1,\n",
       "\"fit\":true,\n",
       "\"align\":false\n",
       "},\n",
       "\"figures\":[{\n",
       "\"ggtitle\":{\n",
       "\"text\":\"10°\"\n",
       "},\n",
       "\"mapping\":{\n",
       "},\n",
       "\"data\":{\n",
       "\"state\":[\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\"],\n",
       "\"poptotal\":[66090.0,10626.0,14991.0,30806.0,5836.0,35688.0,5322.0,16805.0,13437.0,173025.0,34418.0,15921.0,14460.0,33944.0,51644.0,5105067.0,19464.0,10670.0,77932.0,16516.0,19464.0,781666.0,19595.0,7440.0,31704.0,20893.0,14275.0,40319.0,38080.0,6909.0,15317.0,32337.0,8499.0,21373.0,5189.0,8096.0,51159.0,30787.0,61067.0,10609.0,37020.0,20539.0,21821.0,11347.0,317471.0,96255.0,39413.0,56393.0,516418.0,106913.0,15972.0,34392.0,39301.0,30798.0,35244.0,183241.0,129180.0,117206.0,47679.0,249238.0,41561.0,12846.0,16269.0,14752.0,11164.0,17290.0,22422.0,30728.0,36397.0,13930.0,45957.0,182827.0,21412.0,15548.0,17577.0,4373.0,7523.0,5730.0,34583.0,16545.0,148723.0,262852.0,26551.0,178386.0,7498.0,5644.0,22261.0,6534.0,48052.0,123692.0,17619.0,88257.0,13111.0,19181.0,14965.0,17241.0,16522.0,60186.0,357313.0,57733.0,252913.0,32653.0,31095.0,300836.0,63657.0,9441.0,14067.0,38147.0,14080.0,18809.0,38413.0,87777.0,24705.0,30974.0,9914.0,27533.0,38835.0,23645.0,35324.0,119659.0,36616.0,156198.0,26015.0,64404.0,17808.0,19580.0,18840.0,31913.0,74169.0,30410.0,108936.0,45527.0,29890.0,75717.0,48139.0,80827.0,35427.0,37730.0,24960.0,21512.0,29797.0,23661.0,88109.0,39884.0,65294.0,29477.0,475594.0,107066.0,42836.0,130669.0,797159.0,42182.0,10369.0,36897.0,108978.0,34436.0,55920.0,13551.0,37877.0,5315.0,18409.0,17281.0,15410.0,19107.0,12509.0,128932.0,25968.0,12643.0,30315.0,27148.0,24616.0,18129.0,247052.0,20991.0,40307.0,19490.0,22747.0,27446.0,18993.0,7738.0,130598.0,16119.0,6976.0,165058.0,16773.0,106107.0,35069.0,8176.0,44920.0,23717.0,71951.0,25948.0,23265.0,27651.0,10145.0,8972.0,90509.0,30605.0,18185.0,14931.0,7954.0,50057.0,111723.0,12200.0,161378.0,41502.0,135982.0,49477.0,21468.0,21398.0,34604.0,24952.0,57883.0,12260.0,37780.0,26831.0,92879.0,25040.0,430459.0,21896.0,18052.0,64273.0,38982.0,43431.0,35446.0,34951.0,281912.0,57024.0,30209.0,13175.0,54624.0,149756.0,223411.0,13497.0,500631.0,1701.0,8583.0,74768.0,16527.0,91476.0,115645.0,5763.0,10674.0,717400.0,21265.0,70887.0,25537.0,37308.0,24920.0,75651.0,12147.0,133600.0,53059.0,8936.0,158983.0,38202.0,1083592.0,22454.0,18681.0,8854.0,20146.0,7842.0,17957.0,187768.0,13743.0,19776.0,211946.0,145607.0,58913.0,39928.0,8302.0,69770.0,55498.0,70060.0,282937.0,2111687.0,26360.0,25371.0,109755.0,47507.0,99821.0,59549.0,44585.0,71074.0,34966.0,291479.0,26521.0,36019.0,147548.0,150187.0,35415.0,108276.0,35427.0,47870.0,1412140.0,53619.0,39350.0,66929.0,76779.0,103461.0,27466.0,961437.0,38498.0,30954.0,81129.0,136731.0,39024.0,866228.0,65536.0,31111.0,16085.0,29108.0,35728.0,25533.0,32849.0,56240.0,30230.0,80298.0,47473.0,215499.0,61834.0,128300.0,42310.0,271126.0,462361.0,37068.0,264806.0,64274.0,122354.0,22987.0,39443.0,93182.0,15497.0,573809.0,14194.0,27749.0,82068.0,11336.0,40029.0,20488.0,31557.0,48255.0,24249.0,142585.0,40113.0,33819.0,126137.0,69330.0,61963.0,80327.0,59733.0,44915.0,367585.0,514990.0,227813.0,84090.0,31969.0,30464.0,11098.0,113909.0,62254.0,101461.0,36956.0,113269.0,22254.0,15682.0,16307.0,40750.0,14008.0,194594.0,13584.0,13084.0,34291.0,52360.0,31647.0,45088.0,15940.0,367085.0,76559.0,25690.0,41758.0,35909.0,85183.0,4590.0,90083.0,8776.0,49264.0,30339.0,18651.0,20150.0,6153.0,16588.0,67783.0,21650.0,128181.0,18878.0,97904.0,16076.0,19505.0,26993.0,80421.0,115400.0,40548.0,12321.0,3890.0,959275.0,36633.0,30226.0,31679.0,140510.0,72831.0,7107.0,32765.0,34773.0,61405.0,15600.0,175034.0,17521.0,139510.0,15079.0,50251.0,46975.0,14181.0,37157.0,103877.0,18901.0,25263.0,25617.0,17707.0,75000.0,13772.0,95328.0,304715.0,46104.0,19385.0,140320.0,73605.0]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[{\n",
       "\"aesthetic\":\"y\",\n",
       "\"position\":\"both\"\n",
       "}],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "\"x\":\"state\",\n",
       "\"y\":\"poptotal\"\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"color\":\"light_gray\",\n",
       "\"position\":\"jitter\",\n",
       "\"geom\":\"jitter\",\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"axis_text_x\":{\n",
       "\"blank\":true\n",
       "},\n",
       "\"axis_text\":{\n",
       "\"angle\":10.0,\n",
       "\"blank\":false,\n",
       "\"color\":\"blue\"\n",
       "},\n",
       "\"text\":{\n",
       "\"color\":\"gray\",\n",
       "\"size\":13.0,\n",
       "\"blank\":false\n",
       "}\n",
       "}\n",
       "},{\n",
       "\"ggtitle\":{\n",
       "\"text\":\"90°\"\n",
       "},\n",
       "\"mapping\":{\n",
       "},\n",
       "\"data\":{\n",
       "\"state\":[\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Illinois\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Indiana\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Michigan\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Ohio\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\",\"Wisconsin\"],\n",
       "\"poptotal\":[66090.0,10626.0,14991.0,30806.0,5836.0,35688.0,5322.0,16805.0,13437.0,173025.0,34418.0,15921.0,14460.0,33944.0,51644.0,5105067.0,19464.0,10670.0,77932.0,16516.0,19464.0,781666.0,19595.0,7440.0,31704.0,20893.0,14275.0,40319.0,38080.0,6909.0,15317.0,32337.0,8499.0,21373.0,5189.0,8096.0,51159.0,30787.0,61067.0,10609.0,37020.0,20539.0,21821.0,11347.0,317471.0,96255.0,39413.0,56393.0,516418.0,106913.0,15972.0,34392.0,39301.0,30798.0,35244.0,183241.0,129180.0,117206.0,47679.0,249238.0,41561.0,12846.0,16269.0,14752.0,11164.0,17290.0,22422.0,30728.0,36397.0,13930.0,45957.0,182827.0,21412.0,15548.0,17577.0,4373.0,7523.0,5730.0,34583.0,16545.0,148723.0,262852.0,26551.0,178386.0,7498.0,5644.0,22261.0,6534.0,48052.0,123692.0,17619.0,88257.0,13111.0,19181.0,14965.0,17241.0,16522.0,60186.0,357313.0,57733.0,252913.0,32653.0,31095.0,300836.0,63657.0,9441.0,14067.0,38147.0,14080.0,18809.0,38413.0,87777.0,24705.0,30974.0,9914.0,27533.0,38835.0,23645.0,35324.0,119659.0,36616.0,156198.0,26015.0,64404.0,17808.0,19580.0,18840.0,31913.0,74169.0,30410.0,108936.0,45527.0,29890.0,75717.0,48139.0,80827.0,35427.0,37730.0,24960.0,21512.0,29797.0,23661.0,88109.0,39884.0,65294.0,29477.0,475594.0,107066.0,42836.0,130669.0,797159.0,42182.0,10369.0,36897.0,108978.0,34436.0,55920.0,13551.0,37877.0,5315.0,18409.0,17281.0,15410.0,19107.0,12509.0,128932.0,25968.0,12643.0,30315.0,27148.0,24616.0,18129.0,247052.0,20991.0,40307.0,19490.0,22747.0,27446.0,18993.0,7738.0,130598.0,16119.0,6976.0,165058.0,16773.0,106107.0,35069.0,8176.0,44920.0,23717.0,71951.0,25948.0,23265.0,27651.0,10145.0,8972.0,90509.0,30605.0,18185.0,14931.0,7954.0,50057.0,111723.0,12200.0,161378.0,41502.0,135982.0,49477.0,21468.0,21398.0,34604.0,24952.0,57883.0,12260.0,37780.0,26831.0,92879.0,25040.0,430459.0,21896.0,18052.0,64273.0,38982.0,43431.0,35446.0,34951.0,281912.0,57024.0,30209.0,13175.0,54624.0,149756.0,223411.0,13497.0,500631.0,1701.0,8583.0,74768.0,16527.0,91476.0,115645.0,5763.0,10674.0,717400.0,21265.0,70887.0,25537.0,37308.0,24920.0,75651.0,12147.0,133600.0,53059.0,8936.0,158983.0,38202.0,1083592.0,22454.0,18681.0,8854.0,20146.0,7842.0,17957.0,187768.0,13743.0,19776.0,211946.0,145607.0,58913.0,39928.0,8302.0,69770.0,55498.0,70060.0,282937.0,2111687.0,26360.0,25371.0,109755.0,47507.0,99821.0,59549.0,44585.0,71074.0,34966.0,291479.0,26521.0,36019.0,147548.0,150187.0,35415.0,108276.0,35427.0,47870.0,1412140.0,53619.0,39350.0,66929.0,76779.0,103461.0,27466.0,961437.0,38498.0,30954.0,81129.0,136731.0,39024.0,866228.0,65536.0,31111.0,16085.0,29108.0,35728.0,25533.0,32849.0,56240.0,30230.0,80298.0,47473.0,215499.0,61834.0,128300.0,42310.0,271126.0,462361.0,37068.0,264806.0,64274.0,122354.0,22987.0,39443.0,93182.0,15497.0,573809.0,14194.0,27749.0,82068.0,11336.0,40029.0,20488.0,31557.0,48255.0,24249.0,142585.0,40113.0,33819.0,126137.0,69330.0,61963.0,80327.0,59733.0,44915.0,367585.0,514990.0,227813.0,84090.0,31969.0,30464.0,11098.0,113909.0,62254.0,101461.0,36956.0,113269.0,22254.0,15682.0,16307.0,40750.0,14008.0,194594.0,13584.0,13084.0,34291.0,52360.0,31647.0,45088.0,15940.0,367085.0,76559.0,25690.0,41758.0,35909.0,85183.0,4590.0,90083.0,8776.0,49264.0,30339.0,18651.0,20150.0,6153.0,16588.0,67783.0,21650.0,128181.0,18878.0,97904.0,16076.0,19505.0,26993.0,80421.0,115400.0,40548.0,12321.0,3890.0,959275.0,36633.0,30226.0,31679.0,140510.0,72831.0,7107.0,32765.0,34773.0,61405.0,15600.0,175034.0,17521.0,139510.0,15079.0,50251.0,46975.0,14181.0,37157.0,103877.0,18901.0,25263.0,25617.0,17707.0,75000.0,13772.0,95328.0,304715.0,46104.0,19385.0,140320.0,73605.0]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[{\n",
       "\"aesthetic\":\"y\",\n",
       "\"position\":\"both\"\n",
       "}],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "\"x\":\"state\",\n",
       "\"y\":\"poptotal\"\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"color\":\"light_gray\",\n",
       "\"position\":\"jitter\",\n",
       "\"geom\":\"jitter\",\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"axis_text_x\":{\n",
       "\"blank\":true\n",
       "},\n",
       "\"axis_text\":{\n",
       "\"angle\":90.0,\n",
       "\"blank\":false,\n",
       "\"color\":\"blue\"\n",
       "},\n",
       "\"text\":{\n",
       "\"color\":\"gray\",\n",
       "\"size\":13.0,\n",
       "\"blank\":false\n",
       "}\n",
       "}\n",
       "}],\n",
       "\"ggsize\":{\n",
       "\"width\":800.0,\n",
       "\"height\":300.0\n",
       "},\n",
       "\"kind\":\"subplots\"\n",
       "};\n",
       "           var plotContainer = document.getElementById(\"k1JCQC\");\n",
       "           window.letsPlotCall(function() {{\n",
       "               LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer);\n",
       "           }});\n",
       "       })();    \n",
       "   </script>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gggrid(\n",
    "    plots = listOf(\n",
    "        yBothPlot + theme(axisText=elementText(angle=10)) + highlightAxisLabels + ggtitle(\"10°\"),\n",
    "        yBothPlot + theme(axisText=elementText(angle=90)) + highlightAxisLabels + ggtitle(\"90°\")\n",
    "    ), \n",
    "    ncol = 2, \n",
    ") + ggsize(800, 300)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Kotlin",
   "language": "kotlin",
   "name": "kotlin"
  },
  "language_info": {
   "codemirror_mode": "text/x-kotlin",
   "file_extension": ".kt",
   "mimetype": "text/x-kotlin",
   "name": "kotlin",
   "nbconvert_exporter": "",
   "pygments_lexer": "kotlin",
   "version": "1.8.20"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
